﻿@{
    ViewBag.Title = "报表过滤条件";
}
@section header{

}
<form id="form1">
    <div class="form-layout">
        <input type="hidden" name="ID" value="" />
        <input type="hidden" id="OrderBy" name="OrderBy" value="" />
        <input type="hidden" id="AddTime" name="AddTime" value="" />
        <table class="form">

            <tr>
                <th class="formTitle">问卷</th>
                <td class="formValue">
                    <input id="SurveyUid" name="SurveyUid" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">问题</th>
                <td class="formValue">
                    <input id="QuestionUid" name="QuestionUid" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">选项</th>
                <td class="formValue">
                    <input id="ChoiceUid" name="ChoiceUid" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">矩阵标题</th>
                <td class="formValue">
                    <input id="TitleUid" name="TitleUid" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">条件</th>
                <td class="formValue">
                    <input id="ConditionId" name="ConditionId" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">类型</th>
                <td class="formValue">
                    <input id="TypeId" name="TypeId" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">有效开始时间</th>
                <td class="formValue">
                    <input id="EnableDate" name="EnableDate" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">有效截止时间</th>
                <td class="formValue">
                    <input id="DisableDate" name="DisableDate" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>



        </table>
    </div>
</form>

@section scripts{
    <script>
        var baseUrl = "/Survey/SurReportFilter/";
    var keyValue = $.request("keyValue");
    $(function () {
        initControl();
        if (!!keyValue) {
            $.ajax({
                url:baseUrl+"GetFormJson",
                data: { keyValue: keyValue },
                dataType: "json",
                async: false,
                success: function (data) {
                    $("#form1").formSerialize(data);
                }
            });
        }
    });
    function initControl() {

    }
    function submitForm() {
        if (!$('#form1').formValid()) {
            return false;
        }
        $.submitForm({
            url: baseUrl+"SubmitForm?keyValue=" + keyValue,
            param: $("#form1").formSerialize(),
            success: function () {
                $.currentWindow().$("#gridList").resetSelection();
                $.currentWindow().$("#gridList").trigger("reloadGrid");
            }
        })
    }
    </script>
}